package test.redis.tool.main;

import org.apache.log4j.Logger;
import test.redis.tool.RedisConnect;
import test.redis.tool.RedisToolConfig;

public class RedisMain {
    
    private static Logger logger = Logger.getLogger(RedisMain.class);

    public static void main(String[] args) {
        System.out.println("------------------loadConfig STARTED-----------------");
        RedisToolConfig.loadConfig();
        System.out.println("------------------loadConfig STARTED-----------------");
        System.out.println("------------------MIGRATE STARTED-----------------");
//        Map<String, Long> map = RedisConnect.redisInstance.hgetAll("RegistrationFormTime", Long.class);
//        
//        for (Entry<String, Long> entry : map.entrySet()) {
//            logger.info("key:" + entry.getKey()+"; value: "+ entry.getValue().longValue());
//        }
        String v1 = RedisConnect.redisInstance.getString("a");
        String v2 = RedisConnect.redisInstance.getString("b");
        logger.info("v1: "+v1 +" v2:"+v2);
        RedisConnect.redisInstance.set("a", v1.toUpperCase());
        RedisConnect.redisInstance.set("b", v2.toUpperCase());
        
        
        System.out.println("------------------MIGRATE FINISHED-----------------");
    }
}
